<style lang="scss">
	/* 注意要写在第一行，同时给style标签加入lang="scss"属性 */
	@import "@/uni_modules/uview-ui/index.scss";
</style>
<script>
	export default {
		onLaunch: async function() {
			const token=wx.getStorageSync("user_token")
				if(token){
					console.log(token);
				const data=await this.$api.mine.getUserInfo({token:token})

						if(data[0]._id){
							getApp().globalData.userInfo=data[0]
							this.userInfo=getApp().globalData.userInfo
							console.log("更新后的用户数据",this.userInfo);
						}
				}
			
		},
		onShow: function() {
			console.log('App Show') 
		},
		onHide: function() {
			console.log('App Hide')
		},
		globalData:{
			userInfo:null
		}
	}
</script>


